package cn.ryanpenn.javafx.samples.javafxui;

import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.stage.Stage;

import java.io.IOException;

/**
 * JavaFxUiApplication
 */
public class JavaFxUiApplication extends Application {

    @Override
    public void start(Stage stage) throws IOException {

        Parent root = FXMLLoader.load(AssetsUtils.getResource("assets/layout/fxml_example.fxml"));

        stage.setTitle("Welcome");
        stage.setScene(new Scene(root, 800, 600));
        stage.setResizable(false);
        stage.getIcons().add(AssetsUtils.getImage("icon.png"));
        stage.show();
    }

    public static void main(String[] args) {
        launch(args);
    }
}